package com.kyleromano.disgaea.dataType;

import java.util.Comparator;

public class CharacterListItemLevelComparator implements Comparator<CharacterListRowItem> {
	private boolean ascending;
	
	public CharacterListItemLevelComparator(boolean asc) {
		ascending = asc;
	}
	
	public int compare(CharacterListRowItem o1, CharacterListRowItem o2) {
		int value = o1.getLevel() - o2.getLevel();
		if(!ascending)
			return value;
		else
			return -value;
	}
}